<?php
include 'cronDB.config.php';

$backupFile = "backups/LWBC_MAIN_" . date("Ymd") . '.bkp';

print "Backup Started - {$backupFile}\n\n";
print "host: " . $DB->obj['sql_host'] . "\n";
print "database: " . $DB->obj['sql_database'] . "\n\n";

$command = "mysqldump --opt -h {$DB->obj['sql_host']} -u {$DB->obj['sql_user']}  -p{$DB->obj['sql_pass']} {$DB->obj['sql_database']} > {$backupFile}";
system($command);

print "Backup Finished - {$backupFile}\n";
?>